import 'dart:convert';
import 'dart:io';

import 'package:chat_app_project/models/res_entity.dart';
import 'package:chat_app_project/tool/request_client.dart';
import 'package:dio/dio.dart';
import 'package:wukongimfluttersdk/entity/conversation.dart';
import 'package:wukongimfluttersdk/entity/msg.dart';

import '../models/const.dart';

const UPLOAD_URL = "/app/file/upload/images";

class FileDao {

  static Future<ResEntity> upload(FormData formData) async {
    var req = RequestClient();
    final response = await req.post(UPLOAD_URL, data: formData);
    return ResEntity.fromJson(response.data);
  }

}
